<?php
//include the functions.php
require "include/functions.php";

session_start();

?>

<html>
<head>
<title>Home Electronics - Login page</title>
<script type="text/javascript" language="JavaScript">

function Login()
{
	if ((document.loginform.myusername.value != '') && (document.loginform.mypassword.value != '') )
	{
		document.loginform.submit();	
	}
	else
	{
		alert ('Please type an username and password');
		document.loginform.myusername.focus();
	}
}

</script>

<link rel="stylesheet" href="include/styles.css" type="text/css">
</head>
<body>
<div id="container" align="center">
   <div id="header">
		<div id="topmenu"><ul><?php top_menu(); ?></ul></div> 
		<div id="menu" align="right">
		<form name="form1" method="post" action="search.php">
		<tr>
		<td height="35" width="78"><a>Search Products</a></td>
		<td height="35" width="3">:</td>
		<td height="35" width="294"><input name="mysearch" type="text" id="mysearch">&nbsp;&nbsp;&nbsp;</td>
		</tr>
		</form>
		</div>
		<div id="menubar"> <!-- Menu buttons -->
  		<ul>
   		<li><a href="index.php" title="Home"><span>Home</span></a></li>
	    <li><a href="#" title="Computing"><span>Computing</span></a></li>
		<li><a href="#" title="Kitchen"><span>Kitchen</span></a></li>
		<li><a href="#" title="Bathroom"><span>Bathroom</span></a></li>
		<li><a href="#" title="Laundry"><span>Laundry</span></a></li>
		<li><a href="#" title="Furniture and Bedding"><span>Furniture & Bedding</span></a></li>
		<li><a href="contact.php" title="Contact"><span>Contact Us</span></a></li>
    	</ul>
		</div>
	</div> <!-- Header -->

	
	<div id="body" align="center">
		<div id="page">
<table width="300" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
		<tr>
			<form name="loginform" method="post" action="include/check_login.php">

				<td>
					<table alig="center" width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF">
						<tr>
							<td colspan="3"><strong>Member Login</strong></td>
						</tr>
						<tr>
							<td width="78">Username</td>
							<td width="20">: </td>
							<td width="245"><input name="myusername" type="text" id="myusername"></td>
						</tr>
						<tr>
							<td>Password</td>
							<td>: </td>
							<td><input name="mypassword" type="password" id="mypassword"></td>
						</tr>
						<tr>
							<td>&nbsp;</td>
							<td>&nbsp;</td>
							<td><input type="button" name="Submit" value="Login" onClick="Javascript:Login();">&nbsp;&nbsp;&nbsp;</td>
						
						</tr>
					</table>
				</td>
			</form>
		</tr>
</table>
		</div>
	</div> <!--body div -->
   		
   <? footer(); ?>
</div>
</body>
<script>
	document.forms['loginform'].elements['myusername'].focus();
</script>
</html>